<script src="https://unpkg.com/vue"></script>

<div id="app">
  <p>{{ message | capitalize }}</p>
</div>

<script>
  new Vue({
    el: '#app',
    data: {
      message: 'hello Vue.js!'
    },
    filters: {
      capitalize: function (value) {
        console.log(value)
        if (!value) return ''
        value = value.toString()
        return value.charAt(0).toUpperCase() + value.slice(1)
      }
    }
  });

</script>
